-
Notifications
You must be signed in to change notification settings - Fork 23
Automatically build and promote overcloud host images #1898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stackhpc/2025.1
Are you sure you want to change the base?
Automatically build and promote overcloud host images #1898
Conversation
33704d6
to
6b58727
Compare
Here's examples of the trigger:
|
151c185
to
e1f756a
Compare
Trigger building new overcloud host images when a change to pulp-repo-versions.yml is pushed to stackhpc/2025.1.
Given these builds are now automatic, we need to be alerted whne they fail.
e1f756a
to
eb57551
Compare
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces automation to build overcloud host images when pulp-repo-versions.yml
is updated. The changes are well-structured, adding a new path filter for GitHub Actions and a corresponding release note. The renaming of .github/path-filters.yml
to a more specific name is also a good improvement for clarity. I have one minor suggestion for the release note to improve its readability for a wider audience.
releasenotes/notes/automation-around-overcloud-host-images-1cb4ed5da1faee94.yaml
Show resolved
Hide resolved
branch: bump-overcloud-host-images-${{ inputs.rocky9_tag }}-${{ inputs.ubuntu_noble_tag }} | ||
delete-branch: true | ||
title: >- | ||
DNM test PR: Bump overcloud host image tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a real PR right?
DNM test PR: Bump overcloud host image tags | |
Bump overcloud host image tags |
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | ||
if: always() | ||
|
||
- name: Trigger update overcloud host image tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this to trigger every time?
We can keep it on by default, but it'd be nice to have an option to skip the tag update since sometimes we just want to test that images do in fact build with a new configuration
-e os_release='9' | ||
env: | ||
ARTIFACT_TAG: ${{ inputs.image_tag }} | ||
ARTIFACT_TAG: "{{ stackhpc_rocky_9_overcloud_host_image_version }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just trying to understand what's going on here
So, are you setting this env var to a jinja template of the stackhpc_rocky_9_overcloud_host_image_version
variable, which then gets resolved within the playbook?
$(if [[ "${{ inputs.rocky9 }}" == "true" ]]; then echo "-f rocky9_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi) \ | ||
$(if [[ "${{ inputs.ubuntu-noble }}" == "true" ]]; then echo "-f ubuntu_noble_tag=${{ steps.host_image_tag.outputs.host_image_tag }}"; fi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See review at .github/workflows/update-overcloud-host-image-tags.yml:46
commit-message: >- | ||
Bump overcloud host image tags | ||
author: stackhpc-ci <[email protected]> | ||
branch: bump-overcloud-host-images-${{ inputs.rocky9_tag }}-${{ inputs.ubuntu_noble_tag }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get why both tags are templated here but if both rocky and ubuntu are built, same tag will repeat twice.
I think what we can do instead is
- replace inputs with
update_rocky9_tag
(bool),update_ubuntu_noble_tag
(bool) andhost_image_tag
(string) - Pass
inputs.rocky9
,inputs.ubuntu-noble
steps.host_image_tag.outputs.host_image_tag
from.github/workflows/overcloud-host-image-build.yml
needs: | ||
- runner-selection | ||
permissions: {} | ||
permissions: write-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need all writes for this workflow?
are built successfully, a PR will be automatically proposed back to SKC to | ||
bump the image tags. These images will then be automatically promoted when | ||
new host image tags are merged. If the overcloud host image build fails, an | ||
alert will be sent to #release-train-alerts on Slack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is too specific to us and can be removed
When updates to pulp-repo-versions.yml are pushed, new overcloud host images are automatically built.
Once the images build successfully, a new PR is proposed to SKC to bump the host image tags.
If this fails, we're now alerted in #release-train-alerts
The auto-promotion workflow is extended to automatically promote host images too.